package org.example.pattern.strategy.factory;

import org.example.pattern.strategy.service.AirService;
import org.example.pattern.strategy.service.impl.ARJImpl;
import org.example.pattern.strategy.service.impl.C919Impl;

import java.util.HashMap;
import java.util.Map;

public class AirFactory {
    static Map<String, AirService>  map = new HashMap<>();

    public static AirService getCode(String code) {
        map.put("ARJ", new ARJImpl());
        map.put("C919", new C919Impl());
        return map.get(code);
    }
}
